package snortGame;
/**
 * NimController.java defines a "referee" for the game Nim.  It keeps track of the current players' turn, prompts them for their move and determines when the game has finished.
 * 
 * @author Andre Harvey, Deanna Finke, Tyler Radley
 * @version 1.0
 */
//package something;
 
import java.lang.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
import java.awt.*;

public class SnortNode extends JLabel implements MouseListener{
	
	Dimension minSize = new Dimension(15, 15);
	
	private int rowIndex, colIndex;
	
    public SnortNode(Color color, int rowIndex, int colIndex) {
		this.rowIndex = rowIndex;
		this.colIndex = colIndex;
        setBackground(color);
        setOpaque(true);
        setBorder(BorderFactory.createLineBorder(Color.black));
    }

    public Dimension getMinimumSize() {
        return minSize;
    }

    public Dimension getPreferredSize() {
        return minSize;
    }
	
	public void setColor(Color color){
		setBackground(color);
	}
	
	public int getRowIndex(){
		return this.colIndex;
	}
	
	public int getColIndex(){
		return this.rowIndex;
	}
	
	void eventOutput(String eventDescription, MouseEvent e) {
        textArea.append(eventDescription + " detected on "
                + e.getComponent().getClass().getName()
                + "." + NEWLINE);
        textArea.setCaretPosition(textArea.getDocument().getLength());
    }
    
    public void mousePressed(MouseEvent e) {    
    }
    
    public void mouseReleased(MouseEvent e) {
    }
    
    public void mouseEntered(MouseEvent e) {      
    }
    
    public void mouseExited(MouseEvent e) {      
    }
    
    public void mouseClicked(MouseEvent e) {
        
    }
}